package com.example.lancooznbk.model.api;

import com.example.lancooznbk.service.HttpGetServer;
import com.example.lancooznbk.service.HttpPostServer;
import com.lancoo.rxretrofitlibrary.Api.BaseApi;
import com.lancoo.rxretrofitlibrary.Api.UserInfo;
import com.lancoo.rxretrofitlibrary.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxFragment;

import retrofit2.Retrofit;
import rx.Observable;

/**
 * Created by tangminglong on 17/8/30.
 */

public class TemplateSettingApi extends BaseApi{

    private String templateId;
    private String templateName;
    private String lastTempletId;
    private String lastTempletName;
    private String zsdDomain;

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getTemplateName() {
        return templateName;
    }

    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }

    public String getLastTempletId() {
        return lastTempletId;
    }

    public void setLastTempletId(String lastTempletId) {
        this.lastTempletId = lastTempletId;
    }

    public String getLastTempletName() {
        return lastTempletName;
    }

    public void setLastTempletName(String lastTempletName) {
        this.lastTempletName = lastTempletName;
    }

    public String getZsdDomain() {
        return zsdDomain;
    }

    public void setZsdDomain(String zsdDomain) {
        this.zsdDomain = zsdDomain;
    }

    public TemplateSettingApi(HttpOnNextListener listener, RxFragment rxFragment) {
        super(listener, rxFragment);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostServer httpPostServer = retrofit.create(HttpPostServer.class);
        return httpPostServer.setPaperTemplate(UserInfo.StuId,UserInfo.StuName,UserInfo.SubjectId,UserInfo.StageNo,templateId,templateName,
                lastTempletId,lastTempletName,zsdDomain);
    }
}
